From 8e979f59b4506342af55e1ee7881e761ff8a9d24 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 26 Jan 1999 01:18:13 +0000 Subject: [PATCH] New functions to set the colormap or visual of an existing widget. These Mon Jan 25 20:05:22 1999 Owen Taylor * gtk/gtkwidget.c (gtk_widget_set_{visual,colormap}): New functions to set the colormap or visual of an existing widget. These functions should not be called on a widget that has previosly been realized. --- gtk/gtkwidget.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index f41442cb46..ac08a6ed95 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -528,6 +528,19 @@ GtkWidget* gtk_widget_get_ancestor (GtkWidget *widget, GtkType widget_type); GdkColormap* gtk_widget_get_colormap (GtkWidget *widget); GdkVisual* gtk_widget_get_visual (GtkWidget *widget); + +/* The following functions must not be called on an already + * realized widget. Because it is possible that somebody + * can call get_colormap() or get_visual() and save the + * result, these functions are probably only safe to + * call in a widget's init() function. + */ +void gtk_widget_set_colormap (GtkWidget *widget, + GdkColormap *colormap); +void gtk_widget_set_visual (GtkWidget *widget, + GdkVisual *visual); + + gint gtk_widget_get_events (GtkWidget *widget); void gtk_widget_get_pointer (GtkWidget *widget, gint *x, -- 2.30.2